<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="java.util.Enumeration" %>
<%@ page import="java.util.Iterator" %>

<html>
    <head>
        <title>config</title>
        <style>
            h2,p {text-align: center}
        </style>
    </head>
    <body>

        <%
            String servletName = config.getServletName();
            out.println( "<p>" + servletName + "</p>" );

            ServletContext ctx = config.getServletContext();
            out.println( "<p>" + ctx + "</p>" );

            Enumeration<String> paramNames = config.getInitParameterNames();
            Iterator<String> iterator = paramNames.asIterator();
            while( iterator.hasNext() ){
                String name = iterator.next();
                String value = config.getInitParameter( name );
                out.println( "<p>" + name + " = " + value + "</p>");
            }
        %>

    </body>
</html>
